﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using System.Data.Common;

namespace Chenxin.Lib.Hr.DAL
{
    public class Full_RolePermitionRelationInfo
    {
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public static DataSet GetList(Guid gdRoleId)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select R.RecordId,R.RoleId,R.PermitId,M.PermitName ");
            strSql.Append(" from Base_RolePermitionRelationInfo R,Base_Permit_Define M ");
            strSql.Append(" where R.PermitId = M.PermitId ");
            strSql.Append(" and R.RoleId = '" + gdRoleId + "'");

            Database db = DatabaseFactory.CreateDatabase("Chenxin_Main_Search");
            return db.ExecuteDataSet(CommandType.Text, strSql.ToString());
        }

    }
}
